package net.models;

// Generated 16 avr. 2013 13:52:25 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Visiteur generated by hbm2java
 */
@Entity
@Table(name = "visiteur", catalog = "gsbcr")
public class Visiteur extends AbstractModel {

	private String visMatricule;
	private Secteur secteur;
	private Labo labo;
	private Region region;
	private String visLogin;
	private String visMdp;
	private String visStatut;
	private String visNom;
	private String visPrenom;
	private String visAdresse;
	private String visCp;
	private String visVille;
	private Date visDateembauche;
	private Set<Travailler> travaillers = new HashSet<Travailler>(0);
	private Set<Rapportvisite> rapportvisites = new HashSet<Rapportvisite>(0);
	private Set<Realiser> realisers = new HashSet<Realiser>(0);
	private Set<Offrir> offrirs = new HashSet<Offrir>(0);

	public Visiteur() {
	}

	public Visiteur(String visMatricule, Labo labo, Region region,
			String visLogin, String visMdp, String visStatut) {
		this.visMatricule = visMatricule;
		this.labo = labo;
		this.region = region;
		this.visLogin = visLogin;
		this.visMdp = visMdp;
		this.visStatut = visStatut;
	}

	public Visiteur(String visMatricule, Secteur secteur, Labo labo,
			Region region, String visLogin, String visMdp, String visStatut,
			String visNom, String visPrenom, String visAdresse, String visCp,
			String visVille, Date visDateembauche, Set<Travailler> travaillers,
			Set<Rapportvisite> rapportvisites, Set<Realiser> realisers,
			Set<Offrir> offrirs) {
		this.visMatricule = visMatricule;
		this.secteur = secteur;
		this.labo = labo;
		this.region = region;
		this.visLogin = visLogin;
		this.visMdp = visMdp;
		this.visStatut = visStatut;
		this.visNom = visNom;
		this.visPrenom = visPrenom;
		this.visAdresse = visAdresse;
		this.visCp = visCp;
		this.visVille = visVille;
		this.visDateembauche = visDateembauche;
		this.travaillers = travaillers;
		this.rapportvisites = rapportvisites;
		this.realisers = realisers;
		this.offrirs = offrirs;
	}

	@Id
	@Column(name = "visMatricule", unique = true, nullable = false, length = 10)
	public String getVisMatricule() {
		return this.visMatricule;
	}

	public void setVisMatricule(String visMatricule) {
		String oldValue = this.visMatricule;
		this.visMatricule = visMatricule;
		firePropertyChange("visMatricule", oldValue, visMatricule);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "secCode")
	public Secteur getSecteur() {
		return this.secteur;
	}

	public void setSecteur(Secteur secteur) {
		Secteur oldValue = this.secteur;
		this.secteur = secteur;
		firePropertyChange("secteur", oldValue, secteur);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "labCode", nullable = false)
	public Labo getLabo() {
		return this.labo;
	}

	public void setLabo(Labo labo) {
		Labo oldValue = this.labo;
		this.labo = labo;
		firePropertyChange("labo", oldValue, labo);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "visReg", nullable = false)
	public Region getRegion() {
		return this.region;
	}

	public void setRegion(Region region) {
		Region oldValue = this.region;
		this.region = region;
		firePropertyChange("region", oldValue, region);
	}

	@Column(name = "visLogin", nullable = false)
	public String getVisLogin() {
		return this.visLogin;
	}

	public void setVisLogin(String visLogin) {
		String oldValue = this.visLogin;
		this.visLogin = visLogin;
		firePropertyChange("visLogin", oldValue, visLogin);
	}

	@Column(name = "visMdp", nullable = false)
	public String getVisMdp() {
		return this.visMdp;
	}

	public void setVisMdp(String visMdp) {
		String oldValue = this.visMdp;
		this.visMdp = visMdp;
		firePropertyChange("visMdp", oldValue, visMdp);
	}

	@Column(name = "visStatut", nullable = false)
	public String getVisStatut() {
		return this.visStatut;
	}

	public void setVisStatut(String visStatut) {
		String oldValue = this.visStatut;
		this.visStatut = visStatut;
		firePropertyChange("visStatut", oldValue, visStatut);
	}

	@Column(name = "visNom", length = 25)
	public String getVisNom() {
		return this.visNom;
	}

	public void setVisNom(String visNom) {
		String oldValue = this.visNom;
		this.visNom = visNom;
		firePropertyChange("visNom", oldValue, visNom);
	}

	@Column(name = "visPrenom", length = 50)
	public String getVisPrenom() {
		return this.visPrenom;
	}

	public void setVisPrenom(String visPrenom) {
		String oldValue = this.visPrenom;
		this.visPrenom = visPrenom;
		firePropertyChange("visPrenom", oldValue, visPrenom);
	}

	@Column(name = "visAdresse", length = 50)
	public String getVisAdresse() {
		return this.visAdresse;
	}

	public void setVisAdresse(String visAdresse) {
		String oldValue = this.visAdresse;
		this.visAdresse = visAdresse;
		firePropertyChange("visAdresse", oldValue, visAdresse);
	}

	@Column(name = "visCp", length = 5)
	public String getVisCp() {
		return this.visCp;
	}

	public void setVisCp(String visCp) {
		String oldValue = this.visCp;
		this.visCp = visCp;
		firePropertyChange("visCp", oldValue, visCp);
	}

	@Column(name = "visVille", length = 30)
	public String getVisVille() {
		return this.visVille;
	}

	public void setVisVille(String visVille) {
		String oldValue = this.visVille;
		this.visVille = visVille;
		firePropertyChange("visVille", oldValue, visVille);
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "visDateembauche", length = 19)
	public Date getVisDateembauche() {
		return this.visDateembauche;
	}

	public void setVisDateembauche(Date visDateembauche) {
		Date oldValue = this.visDateembauche;
		this.visDateembauche = visDateembauche;
		firePropertyChange("visDateembauche", oldValue, visDateembauche);
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "visiteur")
	public Set<Travailler> getTravaillers() {
		return this.travaillers;
	}

	public void setTravaillers(Set<Travailler> travaillers) {
		Set<Travailler> oldValue = this.travaillers;
		this.travaillers = travaillers;
		firePropertyChange("travaillers", oldValue, travaillers);
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "visiteur")
	public Set<Rapportvisite> getRapportvisites() {
		return this.rapportvisites;
	}

	public void setRapportvisites(Set<Rapportvisite> rapportvisites) {
		Set<Rapportvisite> oldValue = this.rapportvisites;
		this.rapportvisites = rapportvisites;
		firePropertyChange("rapportvisites", oldValue, rapportvisites);
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "visiteur")
	public Set<Realiser> getRealisers() {
		return this.realisers;
	}

	public void setRealisers(Set<Realiser> realisers) {
		Set<Realiser> oldValue = this.realisers;
		this.realisers = realisers;
		firePropertyChange("realisers", oldValue, realisers);
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "visiteur")
	public Set<Offrir> getOffrirs() {
		return this.offrirs;
	}

	public void setOffrirs(Set<Offrir> offrirs) {
		Set<Offrir> oldValue = this.offrirs;
		this.offrirs = offrirs;
		firePropertyChange("offrirs", oldValue, offrirs);
	}

}
